package org.genuflex.vo
{
	public class GenuflexAssociation
	{
		/*  sourceClass
		 *  The class of the related VO owning the association
		 *  (ex: BlogPostVO on BlogPostVO belonging to AuthorVO)
		*/
		public var sourceClass : Class;

		/*  destClass
		 *  The class of the related VO or array of VOs
		 *  (ex: AuthorVO on BlogPostVO belonging to AuthorVO)
		*/
		public var destClass : Class;


		/*  foreign_key_name
		 *  The id field name on the VO which either binds to the related VO or array of VOs
		 *   (in the case of has_many and belongs_to) or the field name of an array
		 *  (ex: "author_id" on BlogPostVO belonging to AuthorVO)
		 *  (ex: "blog_posts" on AuthorVO having many BlogPostVOs)
		 *   of VOs on the klass that will refer back to the original VO
		 *  (ex: "accounts" on AuthorVO having and belonging to many AccountVOs)
		 */
		public var foreignKeyName : String;

		/*  name
		 *  The property on the VO containing a related VO or array of VOs
		 *  (ex: "author" on BlogPostVO belonging to AuthorVO)
		*/
		public var name : String; 
		
		public function GenuflexAssociation(sourceClass : Class, destClass : Class, foreignKeyName : String, name : String) {
			this.sourceClass = sourceClass;
			this.destClass = destClass;
			this.foreignKeyName = foreignKeyName;
			this.name = name;
		}
	}
}